namespace Bmz.Laboratory.Workflow.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class Initial1 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.TemplateNodeAccessPermissions", "TemplateAccessObject", "dbo.TemplateAccesses");
            DropForeignKey("dbo.InstanceAccesses", "TemplateAccessOject", "dbo.TemplateAccesses");
            DropPrimaryKey("dbo.TemplateAccesses");
            AddColumn("dbo.TemplateAccesses", "Object", c => c.String(nullable: false, maxLength: 50));
            AddPrimaryKey("dbo.TemplateAccesses", "Object");
            AddForeignKey("dbo.TemplateNodeAccessPermissions", "TemplateAccessObject", "dbo.TemplateAccesses", "Object");
            AddForeignKey("dbo.InstanceAccesses", "TemplateAccessOject", "dbo.TemplateAccesses", "Object");
            DropColumn("dbo.TemplateAccesses", "Oject");
        }
        
        public override void Down()
        {
            AddColumn("dbo.TemplateAccesses", "Oject", c => c.String(nullable: false, maxLength: 50));
            DropForeignKey("dbo.InstanceAccesses", "TemplateAccessOject", "dbo.TemplateAccesses");
            DropForeignKey("dbo.TemplateNodeAccessPermissions", "TemplateAccessObject", "dbo.TemplateAccesses");
            DropPrimaryKey("dbo.TemplateAccesses");
            DropColumn("dbo.TemplateAccesses", "Object");
            AddPrimaryKey("dbo.TemplateAccesses", "Oject");
            AddForeignKey("dbo.InstanceAccesses", "TemplateAccessOject", "dbo.TemplateAccesses", "Oject");
            AddForeignKey("dbo.TemplateNodeAccessPermissions", "TemplateAccessObject", "dbo.TemplateAccesses", "Oject");
        }
    }
}
